<?php

class ShareSendAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_STRING,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * 发送分享链接
     * @param $userId
     * @param $shareCode
     * @param $reqTime
     * @param $moduleId
     * @param $subId
     * @return SzResponse
     */
    public function execute($userId, $shareCode, $reqTime, $moduleId = 0, $subId = 0)
    {
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(array(
            ShareService::get()->send($userId, $shareCode, $reqTime, $moduleId, $subId)
        ));
    }
}